package com.springlog.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/log2")
public class LogController2 {
    //private final static Logger logger= LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/print")
    public String print() {
        System.out.println("sout 打印日志");
        log.info("logger 打印日志");
        log.trace("trace 打印日志");
        log.debug("debug 打印日志");
        log.warn("warn 打印日志");
        log.error("error 打印日志");
        return "打印日志";
    }
}
